<%--
  ~ Copyright (c) 2015. 石头哥哥
  --%>

<%--
  Created by IntelliJ IDEA.
  User: dc
  Date: 15-9-1
  Time: 上午9:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<style>
    form {
        margin: 0;
    }
    textarea {
        display: block;
    }
</style>
<%--<link rel="stylesheet" href="../kindeditor/themes/default/default.css"/>--%>
<link rel="stylesheet" href="./kindeditor/themes/simple/simple.css"/>
<script charset="utf-8" src="./kindeditor/kindeditor-all-min.js"></script>
<script charset="utf-8" src="./kindeditor/lang/zh_CN.js"></script>
<script>
    var editor;
    KindEditor.ready(function (K) {
        editor = K.create('textarea[name="content"]', {
            allowFileManager: true,
            themeType: 'simple',
            uploadJson: '/editor/question/uploadImgwithKinder',
            afterCreate: function () {
                var self = this;
                K.ctrl(document, 13, function() {
                    self.sync();
                    document.forms['question'].submit();
                });

                K.ctrl(self.edit.doc, 13, function () {
                    self.sync();
                    document.forms['question'].submit();
                });


            }
        });
    });
</script>

<form name="question" method="post">
    <textarea id="textarea_id" name="content" style="width:900px;height:450px;visibility:hidden;"></textarea>
</form>
